package com.xsp.entity;

import lombok.Data;

/**
 * @author xsp
 * @date 2024/1/10
 * @desc
 */
@Data
public class Dog {
    public Dog() {
        System.out.println("1.调用了构造韩式Dog()");
    }

    private String name;

    public void setName(String name) {
        this.name = name;
        System.out.println("2.通过设值器为属性赋值");
    }

    public void shut() {
        System.out.println(this.name + ":汪汪汪");
    }

    public void testInit() {
        System.out.println("3.调用初始方法");
    }

    public void testDestroy() {
        System.out.println("5.调用销毁方法");
    }
}
